﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace MachineLearning {
    class ErrorVisualizer {
        Bitmap _errorMap = null;
       

        public ErrorVisualizer(int width, int height) {
            _errorMap = new Bitmap(width, height);
        }

        public void setError(double error) {

        }

     
   
    }

    static class ColorSpectrum {
        static Bitmap _testBitmap = null;
        static readonly Color[] _colorArray = null;
        static ColorSpectrum() {
            //fill the color array from red to blue
            _colorArray = new Color[1024];
            int index = 0;
            for (int i = 0; i < 255; i++)
                _colorArray[index++] = Color.FromArgb(255, i, 0);
            for (int i = 255; i >= 0; i--)
                _colorArray[index++] = Color.FromArgb(i, 255, 0);
            for (int i = 0; i < 255; i++)
                _colorArray[index++] = Color.FromArgb(0, 255, i);
            for (int i = 255; i >= 0; i--)
                _colorArray[index++] = Color.FromArgb(0, i, 255);

            _testBitmap = new Bitmap(1024, 16);
            for (int i = 0; i < _testBitmap.Width; i++) {
                for (int j = 0; j < _testBitmap.Height; j++)
                    _testBitmap.SetPixel(i, j, _colorArray[i]);
            }
        }

        public static Bitmap getTestImage() {
            return _testBitmap;
        }

    }
}
